class Animal:
    def __init__(self, name):
        self.name = name

    def eat(self):
        print(f"{self.name} is eating.")

    def sleep(self):
        print(f"{self.name} is sleeping.")


class 飞行能力:
    def fly(self):
        print(f"{self.name} is flying.")


class 游泳能力:
    def swim(self):
        print(f"{self.name} is swimming.")


class Duck(Animal, 飞行能力, 游泳能力):
    def __init__(self, name):
        super().__init__(name)


duck = Duck("Donald")
duck.eat()   # 输出: Donald is eating.
duck.sleep()   # 输出: Donald is sleeping.
duck.fly()   # 输出: Donald is flying.
duck.swim()   # 输出: Donald is swimming.